<template>
    <div class="addressHeader">
        <div class="one" @click="back()">
            <image style="width:40px;height:80px;" src="../../../web/img/header-01.png"></image>
        </div>
        <div class="two">
            <input class="writePath" type="text" placeholder="请输入您搜索的城市名称"/>
        </div>
        <div class="three" @click="go()">
            <image style="width:44px;height:44px;" src="../../../web/img/searchIco.png"></image>
        </div>
    </div>
</template>

<script>
    export default {
        name: "address-header1",
        methods:{
            back(){
                this.$router.push("/chooseAddress");
            },
            go(){
                if(JSON.parse(localStorage.getItem("whereFrom")).statusId===1){
                    this.$router.push("/");
                }else if(JSON.parse(localStorage.getItem("whereFrom")).statusId===2){
                    this.$router.push("/classification");
                }
            }
        }
    }
</script>

<style scoped>
    .writePath{
        width:510px;
        height:50px;
        border-radius: 25px;
        border:1px solid #ccc;
        outline: none;
        text-align: center;
    }
.addressHeader{
    flex-direction:row;
    justify-content: space-between;
    align-items: center;
    width:100%;
    box-shadow: 0 2px 5px #ddd;
    height:90px;
}
    .one{
        margin-left:20px;
    }
    .two{
        font-size: 32px;
        font-weight: 600;
        line-height: 90px;
    }
    .three{
        margin-right:20px;
    }
</style>